<extend name="Public/base"/>
<block name="body">

    <div style="margin: 0px auto;">
        <div class="wrapper wrapper-content animated fadeInRight" >

            <div class="row" >

                <div class="col-sm-6">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>编辑菜单</h5>

                        </div>
                        <div class="ibox-content">
                            <form class="form-horizontal m-t"  action="{:U()}" method="post" onsubmit="return chkform2(this)">

                                <div class="form-group">
                                    <label class="col-sm-3 control-label">菜单名称：</label>
                                    <div class="col-sm-8">
                                        <input type="hidden" name="id" value="{$menu.id}">
                                        <input id="manu_name" name="menu_name" class="form-control" type="text" required="" value="{$menu.menu_name}">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label">链接地址：</label>
                                    <div class="col-sm-8">
                                        <input id="linkurl" name="linkurl" class="form-control" type="text"  value="{$menu.linkurl}">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label">是否隐藏：</label>
                                    <div class="col-sm-8"><select class="form-control m-b" name="hide" id="hide">
                                        <option value="0"><font color="#32cd32">否</font></option>
                                        <option value="1"><font color="red">是</font></option>
                                    </select>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label">上级菜单：</label>
                                    <div class="col-sm-8"><select class="form-control m-b" name="pid" id="pid">
                                        <option value="0">顶级菜单</option>
                                        <volist name="Level" id="vo">
                                            <option value="{$vo.id}">{$vo.menu_name}</option>
                                        </volist>
                                    </select>
                                    </div>
                                </div>




                                <div class="form-group">
                                    <div class="col-sm-8 col-sm-offset-3">
                                        <button class="btn btn-primary" type="submit">提交</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>
        $('#1').attr('class','active');
        $("#pid option[value='{$menu.pid}']").attr("selected", "selected");
        $("#hide option[value='{$menu.hide}']").attr("selected", "selected");
    </script>

</block>